package com.example.demo.service.serviceImpl;

import com.example.demo.mapper.CarouselMapper;
import com.example.demo.model.Carousel;
import com.example.demo.model.CarouselExample;
import com.example.demo.service.CarouselService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CarouselServiceImpl implements CarouselService {
    @Resource
    CarouselMapper carouselMapper;
    @Override
    public List<Carousel> getAllCarousel() {
        CarouselExample carouselExample=new CarouselExample();
        CarouselExample.Criteria criteria = carouselExample.createCriteria();
        criteria.andIsDelEqualTo(false);
        return carouselMapper.selectByExample(carouselExample);
    }
}
